#include<bits/stdc++.h>
using namespace std;
#define N 100001

int main() {
  int n, m;
  cin >> n >> m;
  int sum[N]={0};
  int a[N]={0};
  for (int i=1;i<=n;i++) {
    cin >> sum[i];
    a[i]=sum[i]-sum[i-1];
  }
  while (m--) {
    int s,t,c;
    cin >> s >> t >> c;
    a[s]+=c;
    a[t+1]-=c;
  }
  for (int i=1;i<=n;i++) {
    sum[i]=sum[i-1]+a[i];
  }
  for (int i=1;i<=n;i++) {
    if (i>1)cout<<" ";
    cout<<sum[i];
  }
  cout<<endl;

  return 0;
}
